import xlwings as xw
app = xw.App(visible=False, add_book=False)
workbook = app.books.add()
worksheet = workbook.sheets[0]
worksheet.range('A1').value = ['编号', '姓名', '性别']
worksheet.range('A2').value = [['A001'], ['A002'], ['A003']]
worksheet.range('B2').value = [['小孟'], ['小李'], ['老杜']]
worksheet.range('C2').value = [['男'], ['女'], ['男']]
worksheet.range('A5').value = [['A004', '老赵', '男'], ['A005', '小严', '女'], ['A006', '小王', '女']]
workbook.save('F:\\python\\第4章\\员工表.xlsx')
workbook.close()
app.quit()
